<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<!-- 链接表达式 -->
<!--<script th:src="@{/js/demo.js}"></script>-->
<!--<link th:href="@{/css/bootstrap.css}" rel="stylesheet" type="text/css">-->
<div th:replace="common/head::static"></div>
<head>
    <meta charset="UTF-8">
    <title>Hello Thymeleaf</title>
</head>
<body>
<div>
    <span>访问 Model：</span><span th:text="${person.name}"></span>
</div>
<div>
    <span>访问列表</span>
    <table>
        <thead>
        <tr>
            <th>姓名</th>
            <th>年龄</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="human : ${people}">
            <td th:text="${human.name}"></td>
            <td th:text="${human.age}"></td>
        </tr>
        </tbody>

        <!-- 选择变量表达式 *{} -->cc
        <form id="userForm" th:object="${user}">
            <input id="id" name="id" th:value="*{id}"/>
            <input id="username" name="username" th:value="*{username}"/>
            <input id="password" name="password" th:value="*{password}"/>
        </form>

        <!-- 运算符 -->
        <input name="name" th:value="${'I am '+(user.name!=null?user.name:'NoBody')}"/>

    </table>
</div>
</body>
</html>